PowerTCP Sockets for .NET
TCP Protocol Overview



Transmission Control Protocol (TCP) is a data communications protocol and provides a reliable stream of data between two connected computers.

TCP is the base protocol for Telnet, FTP, SMTP, HTTP, POP, IMAP and other upper-layer protocols that use stream-based communications. In other words, any of these more complicated protocols can be implemented using TCP. In fact, PowerTCP does exactly this, as it uses the Tcp component's base classes for all TCP-related communications.


Features

TCP is built upon IP (Internet Protocol), which provides an unreliable transfer of data. In order to provide a reliable data stream, TCP uses the following methods:


Connections

TCP is a connection-oriented protocol, meaning a connection is established between two hosts before data is exchanged:

  1. A client sends a message to a server requesting a connection. The server has a Daemon process running on a port that handles this request.
  2. The server responds, acknowledging the connect request.
  3. The client in turn acknowledges the server's message.

The server must listen for connections before the client can connect. The following two actions occurred:

While the connection is active, it is uniquely defined by four TCP packet values:

  1. Two port numbers that identify the source and destination TCP port. Port numbers are used by the operating system to route the data to the application "bound" to that port.
  2. Two 4-byte addresses that identify the source and destination host interface. For example, a notebook computer may have one IP address for a LAN card and one IP address for RAS connections using COM3. This would be considered a "multi-homed host," and applications can bind to either port.

Closing a connection works similarly to establishing a connection. One end makes an active close and the other end performs a passive close.

See Also

Reference


PowerTCP Sockets for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic